﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NonconformingEdit.aspx.cs" Inherits="DuJianliang.ApplicationPlatform.Nonconforming.NonconformingEdit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script defer="defer" src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
    <style type="text/css">
        #editTable
        {
            background-color: #000000;            
        }
        #editTable td
        {
            background-color: #ffffff;
            padding: 10px 10px 10px 10px;
        }
    </style>
        <script type="text/javascript">
            function selectItemCode() {
                var retValue = window.showModalDialog(encodeURI("SelectItemCode.aspx?OitmType=157"), "", "dialogWidth=800px;dialogHeight=600px");
                if (retValue != "" && typeof (retValue) != "undefined") {
                    var retValues = retValue.split('|');
                    document.getElementById('<%=hidItemCode.ClientID%>').value = retValues[0];
                    document.getElementById('<%=hidItemName.ClientID%>').value = retValues[1];
                    document.getElementById('<%=txtItemCode.ClientID%>').value = retValues[0];
                    document.getElementById('<%=txtItemName.ClientID%>').value = retValues[1];
                    
                }
            }
            function selectPartsNums() {
                var itemCode = document.getElementById('<%=hidItemCode.ClientID%>').value;
                var retValue = window.showModalDialog(encodeURI("SelectDistNumber.aspx?itemcode=" + itemCode), "", "dialogWidth=800px;dialogHeight=600px");
                if (retValue != "" && typeof (retValue) != "undefined") {
                    document.getElementById('<%=hidPartsNum.ClientID%>').value = retValue;
                    document.getElementById('<%=txtPartsNum.ClientID%>').value = retValue;
                }
            }
            
            function showPage(url, width, height) {
                window.showModalDialog(encodeURI(url), "", "dialogWidth=" + width + ";dialogHeight=" + height);
            }
    </script> 
</head>
<body style="font-size:12px">
    <form id="form1" runat="server">
    <div>
    <table id="editTable" width="800px" border="0" cellpadding="0" cellspacing="1" align="center">
      <tr>
        <td colspan="4" align="center">
            <div style="font-size:20px">不合格品审理单</div>
            <div style="text-align:left";>编号：<asp:Label ID="lblCode" runat="server" ></asp:Label></div>
        </td>        
      </tr>
      <tr>
        <td width="100px">产品名称</td>
        <td>
            <asp:TextBox ID="txtItemCode" runat="server" Width="150px" ReadOnly="True"></asp:TextBox>
            <input id="btnSelectItemCode" type="button" value="选择" onclick="selectItemCode()" runat="server"/><asp:HiddenField ID="hidItemCode" runat="server" />
        </td>
        <td width="100px">不合格品数</td>
        <td><asp:TextBox ID="txtNonconformingCount" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>型号</td>
        <td>
            <asp:TextBox ID="txtItemName" runat="server" Width="150px" ReadOnly="True"></asp:TextBox>
            <asp:HiddenField ID="hidItemName" runat="server" />
        </td>
        <td>车间</td>
        <td><asp:TextBox ID="txtWorkshop" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>图号</td>
        <td>
            <asp:TextBox ID="txtImgNum" runat="server" Width="150px"></asp:TextBox>
        </td>
        <td>责任班组（人）</td>
        <td><asp:TextBox ID="txtWorkTeam" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>件（零组件）号</td>
        <td>
            <asp:TextBox ID="txtPartsNum" runat="server" Width="150px" ReadOnly="True"></asp:TextBox>
            <input id="btnSelectPartsNum" type="button" value="选择" 
                onclick="selectPartsNums()" runat="server"/><asp:HiddenField 
                ID="hidPartsNum" runat="server" />
          </td>
        <td>供方</td>
        <td><asp:TextBox ID="txtSupplier" runat="server" Width="150px"></asp:TextBox></td>
      </tr>
      <tr>
        <td>本批数量</td>
        <td>
            <asp:TextBox ID="txtBatchCount" runat="server" Width="150px"></asp:TextBox>
          </td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <td colspan="4" align="center">
            <asp:Button ID="btnOK" runat="server" Text="确定" Width="60px" 
                onclick="btnOK_Click" />
            &nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="btnCancel" runat="server" Text="取消" Width="60px" 
                CausesValidation="False" onclick="btnCancel_Click" />
        </td>
      </tr>
    </table>
    </div>
    </form>
</body>
</html>
